package com.spic.business.mountguard.service.impl;

import com.spic.business.mountguard.domain.LeadersigninConfig;
import com.spic.business.mountguard.mapper.LeadersigninConfigMapper;
import com.spic.business.mountguard.service.ILeadersigninConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 上岗到位配置Service业务层处理
 *
 * @author yangjie
 * @date 2021-11-02
 */
@Service
public class LeadersigninConfigServiceImpl implements ILeadersigninConfigService
{
    @Autowired
    private LeadersigninConfigMapper leadersigninConfigMapper;

    /**
     * 查询上岗到位配置
     *
     * @param id 上岗到位配置主键
     * @return 上岗到位配置
     */
    @Override
    public LeadersigninConfig selectLeadersigninConfigById(Long id)
    {
        return leadersigninConfigMapper.selectLeadersigninConfigById(id);
    }

    /**
     * 查询上岗到位配置列表
     *
     * @param leadersigninConfig 上岗到位配置
     * @return 上岗到位配置
     */
    @Override
    public List<LeadersigninConfig> selectLeadersigninConfigList(LeadersigninConfig leadersigninConfig)
    {
        return leadersigninConfigMapper.selectLeadersigninConfigList(leadersigninConfig);
    }

    /**
     * 新增上岗到位配置
     *
     * @param leadersigninConfig 上岗到位配置
     * @return 结果
     */
    @Override
    public int insertLeadersigninConfig(LeadersigninConfig leadersigninConfig)
    {
        return leadersigninConfigMapper.insertLeadersigninConfig(leadersigninConfig);
    }

    /**
     * 修改上岗到位配置
     *
     * @param leadersigninConfig 上岗到位配置
     * @return 结果
     */
    @Override
    public int updateLeadersigninConfig(LeadersigninConfig leadersigninConfig)
    {
        return leadersigninConfigMapper.updateLeadersigninConfig(leadersigninConfig);
    }

    /**
     * 批量删除上岗到位配置
     *
     * @param ids 需要删除的上岗到位配置主键
     * @return 结果
     */
    @Override
    public int deleteLeadersigninConfigByIds(Long[] ids)
    {
        return leadersigninConfigMapper.deleteLeadersigninConfigByIds(ids);
    }

    /**
     * 删除上岗到位配置信息
     *
     * @param id 上岗到位配置主键
     * @return 结果
     */
    @Override
    public int deleteLeadersigninConfigById(Long id)
    {
        return leadersigninConfigMapper.deleteLeadersigninConfigById(id);
    }
}
